"use strict";
// ts中同样可以用class定义对象，
// 只不过是对对象里的属性和方法多了类型的约束
class People {
    constructor(name, age) {
        this.name = name;
        this.age = age;
    }
    say() {
        console.log(this.name + "会说话");
    }
}
let xiaoli = new People("小丽", 18);
xiaoli.say();
